package com.webas.api.dao;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
/**
 * 
 * @author tkhasano
 *
 */
public interface IDaoService
{
	<T> T create(T t);
	
	<T> T update(T t);

    <T, PK extends Serializable> void delete(Class<T> type, PK id);

    <T, PK extends Serializable> T find(Class<T> type, PK id);

    <T> List<T> findWithNamedQuery(String queryName);

    <T> List<T> findWithNamedQuery(String queryName, Map<String, Object> params);

    <T> T findUniqueWithNamedQuery(String queryName);

    <T> T findUniqueWithNamedQuery(String queryName, Map<String, Object> params);
}
